- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25.6k
Add a hook to Engine to wrap the DirectoryReader provided to Searchers #135216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| */ | ||
| @Override | ||
| public Bits getLiveDocs() { | ||
| ensureUnownedDocumentsPresent(); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use more generic naming now that the logic is generic (multiple places)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thanks for noting that.
| Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) | 
| @jimczi @henningandersen this is an alternative to #134252 (still 90% @lkts code though) to address concerns you had there about Narrowing the interface to take a query does make the PR larger though. I'd be interested in your thoughs. | 
This is a more limited version of the existing ReaderWrapper that only accepts a query of documents to filter from the reader. It is meant to support temporarily filtering out documents that no longer belong to a shard after it has been split, until the shard is cleaned. The decision about whether to install the filter is made when the index module is created. To reduce overhead in the common case, the query-supplying function may return null in which case the underlying reader is returned directly. Co-authored-by: Oleksandr Kolomiiets <[email protected]>
c1bd812    to
    2891b3f      
    Compare
  
    | I rebased this to add @lkts as co-author to the commit. | 
| @henningandersen @jimczi gentle reminder | 
Adds a protected hook in Engine to allow wrapping the DirectoryReader supplied to a Searcher.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
A small protected method that passes through the provided reader by default.